//
//  ProductListCell.m
//  ZSBTC
//
//  Created by DJ on 17/2/17.
//  Copyright © 2017年 DJ. All rights reserved.
//

#import "ProductListCell.h"

@implementation ProductListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


+ (instancetype)msGetInstance{
    return [[[NSBundle mainBundle] loadNibNamed:[[self class] msGetCellId] owner:nil options:nil] firstObject];
}

+ (NSString *)msGetCellId{
    return @"ProductListCell";
}

- (void)setProductListCellWithAddCartBlock:(ProductListCell_AddCartBlock)AddCartBlock{
    self.AddCartBlock = AddCartBlock;
}


- (IBAction)addCartBtnClick:(UIButton *)sender {
    if (self.AddCartBlock) {
        self.AddCartBlock(self.produtImg);
    }
}

@end
